import request from '@/utils/request'

// 查询质保卡列表
export function listWarrantyCard(query) {
  return request({
    url: '/merchant/warrantyCard/list',
    method: 'get',
    params: query
  })
}

// 查询质保卡详细
export function getWarrantyCard(Id) {
  return request({
    url: '/merchant/warrantyCard/' + Id,
    method: 'get'
  })
}

// 新增质保卡
export function addWarrantyCard(data) {
  return request({
    url: '/merchant/warrantyCard',
    method: 'post',
    data: data
  })
}

// 修改质保卡
export function updateWarrantyCard(data) {
  return request({
    url: '/merchant/warrantyCard',
    method: 'put',
    data: data
  })
}

// 审核质保卡
export function updateAuditWarrantyCard(data) {
  return request({
    url: '/merchant/warrantyCard/audit',
    method: 'post',
    data: data
  })
}

// 删除质保卡
export function delWarrantyCard(Id) {
  return request({
    url: '/merchant/warrantyCard/' + Id,
    method: 'delete'
  })
}
